/* MongoDB schema for Actions API model */

var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

var ActionSchemaModel = new Schema({
    id    : { type: String, required: true },
    value : { type: String, required: true },
    type  : { type: String, required: true },
    time  : { type: Date, required: true }
});

exports.Action = ActionSchemaModel;

var ActionSchema = exports.ActionSchema = mongoose.model('Action', ActionSchemaModel, 'actions');
